package com.ge.modules.api.controller;

import com.ge.common.annotation.AuthIgnoreApi;
import com.ge.common.utils.R;
import com.ge.modules.api.service.TbHeadImgService;
import com.ge.modules.entity.TbHeadImgEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;


/**
 * 轮播图表
 *
 * @author lanyonglin
 * @email www.baidu.com
 * @date 2018-05-17 10:11:41
 */
//@Api("轮播图")
@RestController
@RequestMapping("/api/user/headimg")
public class TbHeadImgController {

    @Autowired
    private TbHeadImgService headImgService;

    /**
     * 查询轮播图列表
     *
     * @return
     */
    @AuthIgnoreApi
    @GetMapping("/list")
//	@ApiOperation(value = "查询轮播图列表")
//	@ApiImplicitParams({
//			@ApiImplicitParam(name = "params", value = "条件", dataType = "map", paramType = "form")
//	})
    public R list(@RequestParam Map<String, Object> param) {
//        Map<String, Object> params = new HashMap<>();
//        params.put("page", 1);
//        params.put("limit", 100);
        //查询列表数据
//        Query query = new Query(params);
        List<TbHeadImgEntity> headImgList = headImgService.queryList(param);
        return R.ok().put("data", headImgList);
    }

}
